const { defineConfig } = require("@vue/cli-service");
module.exports = defineConfig({
  transpileDependencies: true,
  //关闭eslint检查
  lintOnSave: false,
  devServer: {
    host: '0.0.0.0',//开启服务器的url--本地服务器 
    port: 3001,//端口号
    headers: {
      'Access-Control-Allow-Oringin':'*',
    },//对所有的请求不产生跨域问题
    proxy: {
      "/api": {
        target: "http://iwenwiki.com:3000",
        changeOrigin: true,
        pathRewrite: {
          '^/api':''
        }//重写path
      },
      "/foo": {
        target: "https://interface.music.163.com",//目标地址，请求的后台接口
        changeOrigin: true,
        pathRewrite: {
          '^/foo':''
        }//重写path
      },
       '/boo': {
        target: 'https://music.163.com',//目标地址 请求的后台接口 
        ws: true,
        changeOrigin: true,
        pathRewrite:{//路径重写
          "^/boo":''
        }
      },
      
    },
  },
});
